package com.ruoyi.project.basedata.service;

import com.ruoyi.project.basedata.entity.Card;
import com.ruoyi.project.basedata.mapper.CardMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author jia
 * @create 2020-10-30 11:08
 */
@Service
public class CardServiceImpl implements CardService {
    @Autowired
    private CardMapper cardMapper;

    @Override
    public List<Card> selectCardList(Map<String,Object> card) {
//        return cardMapper.selectCardList(card);
        Card card1 = new Card();
        card1.setCardNo("111");
        card1.setCompanyName("海淀");
        card1.setUserName("haidian");
        card1.setBusinessName("配网运检APP");
        Card card2 = new Card();
        card2.setCardNo("222");
        card2.setCompanyName("朝阳");
        card2.setUserName("chaoyang");
        card2.setBusinessName("配网运检APP");
        List<Card> cards = new ArrayList<>();
        cards.add(card1);
        cards.add(card2);
        return cards;
    }

    @Override
    public Card getCard(String cardNo) {
        return cardMapper.getCard(cardNo);
    }
}
